﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ViewLayer.PatientInformationView;
using ControllerLayer.PatientInformation;

namespace ViewLayer
{
    public partial class PatientInfoViewControl : UserControl
    {
        public PatientInfoViewControl(string pid)
        {
            InitializeComponent();
            try
            {
                this.informationAuthorityEnum_TableAdapter.Fill(this.patientInformationDataSet.InformationAuthorityEnum_);

                this.patient_TableAdapter.Fill(this.patientInformationDataSet.Patient_);
                this.patientProfile_TableAdapter.Fill(this.patientInformationDataSet.PatientProfile_, pid);              
                this.patientProfileAddress_TableAdapter.Fill(this.patientInformationDataSet.PatientProfileAddress_);
                this.patientProfileEmailAddress_TableAdapter.Fill(this.patientInformationDataSet.PatientProfileEmailAddress_);
                this.patientProfileContactPerson_TableAdapter.Fill(this.patientInformationDataSet.PatientProfileContactPerson_);
                this.patientProfileTelephoneNumber_TableAdapter.Fill(this.patientInformationDataSet.PatientProfileTelephoneNumber_);
            }
            catch (System.Exception ex)
            {
                //System.Windows.Forms.MessageBox.Show(ex.Message);
            }
        }
    }
}
